//
//  CheckCell.swift
//  AESOLAR_IOS
//
//  Created by Mr.Wang on 2019/10/16.
//  Copyright © 2019 Mr.Wang. All rights reserved.
//

import UIKit

class CheckCell: UITableViewCell {

    let contentBackgroundView = UIView()
    let typeImageView = UIImageView()
    let contentLabel = UILabel()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = .none
        self.backgroundColor = .clear
        
        contentBackgroundView.layer.cornerRadius = 15
        contentBackgroundView.layer.shadowColor = APPConfig.baseColor.cgColor
        contentBackgroundView.layer.shadowOffset = .zero
        contentBackgroundView.layer.shadowRadius = 5
        contentBackgroundView.layer.shadowOpacity = 0.2
        contentBackgroundView.backgroundColor = .white
        self.addSubview(contentBackgroundView)
        contentBackgroundView.snp.makeConstraints { (make) in
            make.left.equalTo(33)
            make.center.equalToSuperview()
            make.height.equalTo(125)
        }
        
        let arrowImage = UIImageView()
        arrowImage.contentMode = .scaleAspectFit
        arrowImage.image = UIImage.init(named: "right_arrow")
        contentBackgroundView.addSubview(arrowImage)
        arrowImage.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.right.equalTo(-10)
            make.height.width.equalTo(15)
        }
        
        typeImageView.contentMode = .scaleAspectFit
        contentBackgroundView.addSubview(typeImageView)
        typeImageView.snp.makeConstraints { (make) in
            make.left.equalTo(20)
            make.centerY.equalToSuperview()
            make.width.equalTo(39)
            make.height.equalTo(50)
        }
        
        contentLabel.textColor = #colorLiteral(red: 0.537254902, green: 0.537254902, blue: 0.537254902, alpha: 1)
        contentLabel.font = UIFont.systemFont(ofSize: 11, weight: .medium)
        contentLabel.numberOfLines = 0
        contentBackgroundView.addSubview(contentLabel)
        contentLabel.snp.makeConstraints { (make) in
            make.left.equalTo(typeImageView.snp.right).offset(20)
            make.centerY.equalToSuperview()
            make.right.equalTo(arrowImage.snp.left).offset(-15)
        }
        
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
